package GUI;

import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import Objects.Score;

public class CongratulationsPanel extends JPanel{
	
	private static final long serialVersionUID = 1L;
	//private JFrame frame;
	private Score score;

	public CongratulationsPanel(JFrame frame, Score score) {
		//this.frame = frame;
		this.score = score;
		setPreferredSize(new Dimension(800,600));
		setVisible(true);
    	setLayout(null);
    	frame.pack();
    	    	
	}
	
	public void paintComponent(Graphics g) {  
        super.paintComponents(g);
        g.drawImage(new ImageIcon(getClass().getResource("/Sprites/congrats.png")).getImage(),0,0,null);
        g.drawImage(new ImageIcon(getClass().getResource("/Sprites/score.png")).getImage(),200,350,null);
        score.drawFinish(g);
        g.drawImage(new ImageIcon(getClass().getResource("/Sprites/thorshoot.gif")).getImage(),365,450,null);
       
    }
	
}
